class PermissionFormModel extends Backbone.Model
    url: '/mytable/getModel?s=table.creators.PermissionTable'
    initialize: (options) =>
        @fetch()
   
#--------------------------------------------------controler
class PermissionsApp
    search: =>
        myapp.mainRegion.close() 
        mymodel = new PermissionFormModel
        @layout = new ModelMainLayout(model: mymodel)
        myapp.mainRegion.show(@layout)

            

#--------------------------------------------------router
class PermissionsAppRouter extends Backbone.Marionette.AppRouter
    appRoutes: 
        "permissions": "search"

                
myapp.addInitializer -> 
    myapp.Permissions_app = new PermissionsApp()
    myapp.Permissions_app.router = new PermissionsAppRouter controller: myapp.Permissions_app

myapp.vent.trigger("routing:started")
